<template>
	<view>
		<view class="u-content">
			<u-parse :content="this.content"></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: "",
			}
		},
		methods: {
			getContent(type){
				let param = {
					ptType: type,
				}
				this.$u.api.apiGetdic(param).then(res => {
					console.log('apiGetdic', res);
					uni.hideLoading();
					if (res.code == 1) {
						this.content = res.data.content
					} else {
						uni.$u.toast(res.msg);
					}
				})
			}
		},
		onLoad(option) {
			uni.setNavigationBarTitle({
				title: option.pageTitle,
				success: () => {
					console.log('修改标题成功')
				},
				fail: () => {
					console.log('修改标题失败')
				},
				complete: () => {
					console.log('修改标题结束')
				},
			})
				
			this.getContent(option.pageType)	
		}
	}
</script>

<style>
	.u-content {
		padding: 20rpx;
	}
</style>